package com.module.retrofit.utils;

import android.widget.Toast;

import com.module.retrofit.ApplicationHelper;

public class ToastUtil {
    private static Toast toast;
    public static void showToast(String text) {
        if (toast == null) {
            toast = Toast.makeText(ApplicationHelper.getContext(), text, Toast.LENGTH_SHORT);
        } else {
            toast.setText(text);
        }
        toast.show();
    }

    public static void destoryToast(){
        if (toast != null) {
            toast=null;
        }
    }
}
